package com.hddz.comlib.model;

import java.io.Serializable;

/**
 * 传感器
 * 
 * @author hddz
 * 
 */
public class Sensor implements Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	/**
	 * 通道
	 */
	private String channel;
	/**
	 * 站点ID
	 */
	private int stationId;
	/**
	 * 值
	 */
	private double value;

	public Sensor() {

	}

	public Sensor(String channel, int stationId, double value) {
		this.channel = channel;
		this.stationId = stationId;
		this.value = value;
	}

	public String getChannel() {
		return channel;
	}

	public void setChannel(String channel) {
		this.channel = channel;
	}

	/**
	 * 位号
	 * 
	 * @return
	 */
	public String getTagName() {
		return stationId + "_" + channel;
	}

	public int getStationId() {
		return stationId;
	}

	public void setStationId(int stationId) {
		this.stationId = stationId;
	}

	public double getValue() {
		return value;
	}

	public void setValue(double value) {
		this.value = value;
	}
}
